import java.util.ArrayList;
import java.util.List;

public class Graph {

	public int sizeX;
	public int sizeY;
	public int startX;
	public int startY;
	public Node[][] nodes;
	public List<Node> visitedNodes;
	public List<Node> colourfulNodes;
	public List<Node> doorsNodes;
	public int doorNumber;

	public Graph(int sizeX, int sizeY) {
		this.sizeX = sizeX;
		this.sizeY = sizeY;
		nodes = new Node[this.sizeY][this.sizeX];
		for (int i = 0; i < this.sizeX; i++) {
			for (int j = 0; j < this.sizeY; j++) {
				nodes[j][i] = new Node(i, j);
			}
		}
	}

	public int getSizeX() {
		return sizeX;
	}

	public void setSizeX(int sizeX) {
		this.sizeX = sizeX;
	}

	public int getSizeY() {
		return sizeY;
	}

	public void setSizeY(int sizeY) {
		this.sizeY = sizeY;
	}

	public int getStartX() {
		return startX;
	}

	public void setStartX(int startX) {
		this.startX = startX;
	}

	public int getStartY() {
		return startY;
	}

	public void setStartY(int startY) {
		this.startY = startY;
	}

	public Node[][] getNodes() {
		return nodes;
	}

	public void setNodes(Node[][] nodes) {
		this.nodes = nodes;
	}

	public List<Node> getVisitedNodes() {
		return visitedNodes;
	}

	public void setVisitedNodes(List<Node> visitedNodes) {
		this.visitedNodes = visitedNodes;
	}

	public List<Node> getColourfulNodes() {
		return colourfulNodes;
	}

	public void setColourfulNodes(List<Node> colourfulNodes) {
		this.colourfulNodes = colourfulNodes;
	}

	public List<Node> getDoorsNodes() {
		return doorsNodes;
	}

	public void setDoorsNodes(List<Node> doorsNodes) {
		this.doorsNodes = doorsNodes;
	}

	public int getDoorNumber() {
		return doorNumber;
	}

	public void setDoorNumber(int doorNumber) {
		this.doorNumber = doorNumber;
	}

	public void setNodesOfGraph() {
		for (int i = 0; i < this.sizeX; i++) {
			for (int j = 0; j < this.sizeY; j++) {
				Node node = this.nodes[j][i];
				node.setGraph(this);
			}
		}
	}

}
